package cn.geminis.lowcode.processor;

import cn.geminis.lowcode.compiler.Context;
import cn.geminis.lowcode.utils.Utils;

import javax.annotation.processing.AbstractProcessor;
import javax.annotation.processing.ProcessingEnvironment;
import javax.lang.model.SourceVersion;

/**
 * @author puddi
 */
public abstract class AbstractBaseProcessor extends AbstractProcessor {

    @Override
    public synchronized void init(ProcessingEnvironment processingEnv) {
        Context.INSTANCE.init(processingEnv);
        super.init(processingEnv);
        Utils.noteMessage(this.getClass().getName() + " Initialed");
    }

    @Override
    public SourceVersion getSupportedSourceVersion() {
        return SourceVersion.latestSupported();
    }
}
